.modal.fade{ id: "comment-history-modal-#{version.id}", tabindex: -1, role: 'dialog',
             aria: { hidden: true } }
  .modal-dialog.modal-xl.modal-fullscreen-xl-down{ role: 'document' }
    .modal-content
      .modal-header
        %h5.modal-title
          - if version.whodunnit
            = render UserAvatarComponent.new(User.find(version.whodunnit))
          = paper_trail_event(version.event)
          = render TimeComponent.new(time: version.created_at)
        %button.btn-close{ type: 'button', data: { 'bs-dismiss': 'modal' }, aria: { label: 'Close' } }
      .modal-body
        %table.table
          - version.changeset.slice('moderator_id', 'user_id').each do |type, users|
            %thead
              %tr
                %th{ colspan: 2 }= type.delete('_id').humanize
              %tr
                %th Before
                %th After
            %tbody
              %tr
                - users.each do |user|
                  %td
                    - if user
                      = render UserAvatarComponent.new(User.find(user))
          - if version.changeset.key?('body')
            %thead
              %tr
                %th{ colspan: 2 } Body
              %tr
                %th Before
                %th After
            %tbody
              %tr
                - version.changeset[:body].each do |body|
                  %td= body
